//Function: to show the type of transformation of function
#include <iostream>
using namespace std;
int squareByValue(int num);
int squareByReference(int &num);

int main()
{
	int i = 2;
	int j = 4;
	cout << "Previous i=" << i << endl;
	squareByValue(i);
	cout << "After i=" << i << endl;
	
	cout << "Previous j=" << j << endl;
	squareByReference(j);
	cout << "After j=" << j << endl;
	return 0;
}

int squareByValue(int num)
{
	num = num * num;
	return num;
}
int squareByReference(int &num)
{
	num = num * num;
	return num;
}
